<template>
    <h1>欢迎登录！！！</h1>
    <h4>近期数据汇总</h4>
    <el-button type="primary" @click="changeShowK">K线图数据</el-button>
    <el-button type="primary" @click="changeShowSimple">简单图标数据</el-button>
    <kChart v-if="showFlagK"></kChart>
    <simpleChart v-if="showFlagSimple"></simpleChart>
</template>

<script setup lang="ts">
import { ref } from "vue";
import kChart from "../Admin/Chart/LinearKChart.vue"
import simpleChart from "../Admin/Chart/SimpleChart.vue"

const showFlagK = ref<boolean>(false)
const showFlagSimple = ref<boolean>(false)
const changeShowK = () => {
    showFlagSimple.value = false
    showFlagK.value = true
}
const changeShowSimple = () => {
    showFlagSimple.value = true
    showFlagK.value = false
}
</script>

<style scoped>
h4 {
    text-align: center;
}
</style>